package com.eqdd.yiqidian.ui.mine.expense

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.View
import com.eqdd.yiqidian.R
import com.eqdd.yiqidian.base.BaseShowActivity
import com.eqdd.yiqidian.base.Config
import org.jetbrains.anko.startActivityForResult

/**
 * @author吕志豪 .
 * @date 18-3-23  上午10:31.
 * Github :https://github.com/lvzhihao100
 * E-Mail：1030753080@qq.com
 * 简书 :http://www.jianshu.com/u/6e525b929aac
 */
class MyExpenseListActivity : BaseShowActivity() {
    override fun initTitle() {
        initTopTitleBar(View.VISIBLE, "我的报销")
        initTopRightImage(R.mipmap.add) { v -> startActivityForResult<AddExpenseActivity>(Config.APPLY_TRAVEL) }
    }

    override fun getFragment(status: Int): Fragment {
        val fragment = MyExpenseFragment()
        val bundle = Bundle()
        bundle.putInt(Config.STATUS, status)
        bundle.putInt(Config.WHO, 0)
        fragment.setArguments(bundle)
        return fragment
    }

    override fun initData() {
        isRxbus = true
        titles.add("待审核")
        titles.add("已审核")
    }
}